package com.aixingfu.sports.Https;


import com.aixingfu.sports.Model.AllCompleteModel;
import com.aixingfu.sports.Model.AllVenueModel;
import com.aixingfu.sports.Model.BuyChargeClassModel;
import com.aixingfu.sports.Model.CacheCardUpgradeModel;
import com.aixingfu.sports.Model.CacheChargeClassParamModel;
import com.aixingfu.sports.Model.CacheParamModel;
import com.aixingfu.sports.Model.CardTypeModel;
import com.aixingfu.sports.Model.ChargeContractModel;
import com.aixingfu.sports.Model.ChargeContractSignSaveModel;
import com.aixingfu.sports.Model.CodeModel;
import com.aixingfu.sports.Model.ContractSignSaveModel;
import com.aixingfu.sports.Model.DepositModel;
import com.aixingfu.sports.Model.DiscountModel;
import com.aixingfu.sports.Model.DoCarRenewalModel;
import com.aixingfu.sports.Model.DoCardUpgradeModel;
import com.aixingfu.sports.Model.LoginModel;
import com.aixingfu.sports.Model.MemberCardListModel;
import com.aixingfu.sports.Model.MemberCardSurplusMoneyModel;
import com.aixingfu.sports.Model.MobileAndIdModel;
import com.aixingfu.sports.Model.OrderDealModel;
import com.aixingfu.sports.Model.OrderListModel;
import com.aixingfu.sports.Model.OrderSaveModel;
import com.aixingfu.sports.Model.PersonalTrainModel;
import com.aixingfu.sports.Model.RenewContractModel;
import com.aixingfu.sports.Model.RenewModel;
import com.aixingfu.sports.Model.RenewType2Model;
import com.aixingfu.sports.Model.RetrievePwdModel;
import com.aixingfu.sports.Model.SaleModel;
import com.aixingfu.sports.Model.SearchModel;
import com.aixingfu.sports.Model.SelectCardTypeModel;
import com.aixingfu.sports.Model.ServiceApplyModel;
import com.aixingfu.sports.Model.SignUploadModel;
import com.aixingfu.sports.Model.UpApkModel;
import com.aixingfu.sports.Model.UpgradeModel;
import com.aixingfu.sports.Model.UserBuyCardModel;
import com.aixingfu.sports.Model.UserCheckModel;
import com.aixingfu.sports.Model.UserInfoModel;
import com.aixingfu.sports.Model.UserPayModel;
import com.aixingfu.sports.Model.UserSignModel;
import com.aixingfu.sports.Model.UserUploadModel;

import java.util.HashMap;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

public interface HomeApi {
    /**
     * 登录接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-service/login")
    Observable<LoginModel> getData(@FieldMap HashMap<String, String> map);

    /**
     * 获取验证码接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-service/send-mobile-code")
    Observable<CodeModel> getCode(@FieldMap HashMap<String, String> map);

    /**
     * 找回密码接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-service/find-pwd")
    Observable<RetrievePwdModel> getRetrievePassword(@FieldMap HashMap<String, String> map);
    /**
     * 由手机号获取指定公司会员信息接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-service-apply/get-member-by-mobile-and-company-id")
    Observable<MobileAndIdModel> getMobileAndID(@Query("accesstoken") String token,@FieldMap HashMap<String, String> map);
    /**
     * 会员服务申请创建接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-service-apply/add")
    Observable<ServiceApplyModel> getServiceApply(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);
    /**
     * 获取会员卡列表接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-service-apply/get-card-list-by-member-id")
    Observable<MemberCardListModel> getMemberCardList(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);

    /**
     * 基本用户信息接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-employee/user-info")
    Observable<UserInfoModel> getUserInfo(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);

    /**
     * 单张图片上传接口
     *
     * @return
     */
    @Multipart
    @POST("/v2/api-employee/user-upload")
    //Observable<UserUploadModel> getSinglePictureUpload(@Query("accesstoken") String token,@FieldMap HashMap<String, String> map);
    Observable<UserUploadModel> getSinglePictureUpload(@Query("accesstoken") String token,@Part  MultipartBody.Part part);
    /**
     * 服务申请图片上传接口
     *
     * @return
     */
    @Multipart
    @POST("v2/api-service-apply/upload-image")
    //Observable<UserUploadModel> getSinglePictureUpload(@Query("accesstoken") String token,@FieldMap HashMap<String, String> map);
    Observable<UserUploadModel> getPictureUpload(@Query("accesstoken") String token,@Part  MultipartBody.Part part);

    /**
     * 获取卡种接口
     *
     * @return
     */
    @GET("/v2/api-employee/get-card-category")
    Observable<CardTypeModel> getCardType(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);

//    /**
//     * 用户签名上传接口
//     *
//     * @return
//     */
//    @FormUrlEncoded
//    @POST("/v2/api-employee/user-sign")
//    Observable<UserSignModel> getUserSign(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);

    /**
     * 用户签名上传接口
     *
     * @return
     */
    @Multipart
    @POST("/v2/api-employee/user-sign")
    Observable<UserSignModel> getUserSign(@Query("accesstoken") String token,@Part MultipartBody.Part part, @Part("type") RequestBody map);

    /**
     * 用户证件照上传接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-employee/user-check")
    Observable<UserCheckModel> getUserCheck(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);
    /**
     * 购卡接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-employee/user-buy-card")
    Observable<UserBuyCardModel> getUserBuyCard(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);
    /**
     * 订单生成接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-employee/order-save")
    Observable<OrderSaveModel> getOrderSave(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);
    /**
     * 平板执行付费接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-member/do-card-renewal")
    Observable<DoCarRenewalModel> getDoCardRenewal(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);
    /**
     * 平板缓存参数接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-member/cache-param")
    Observable<CacheParamModel> getCacheParam(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);
    /**
     * 签名上传接口
     *
     * @return
     */
    @Multipart
    @POST("/v2/api-member/sign-upload")
    Observable<SignUploadModel> getSignUpload(@Query("accesstoken") String token,@Part  MultipartBody.Part part, @Part("type") RequestBody map);
    /**
     * 保存签名接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-member/contract-sign-save")
    Observable<ContractSignSaveModel> getContractSignSave(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);
    /**
     * 购课保存签名接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-member/charge-contract-sign-save")
    Observable<ChargeContractSignSaveModel> getChargeContractSignSave(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);
    /**
     * 升级参数缓存接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-member/cache-card-upgrade-param")
    Observable<CacheCardUpgradeModel> getCacheCardUpgradeParam(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);
    /**
     * 执行卡升级接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-member/do-card-upgrade")
    Observable<DoCardUpgradeModel> getDoCardUpgrade(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);

    /**
     * 购课缓存参数接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-member/cache-charge-class-param")
    Observable<CacheChargeClassParamModel> getCacheChargeClassParam(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);

    /**
     * 执行购课接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("/v2/api-member/buy-charge-class")
    Observable<BuyChargeClassModel> getBuyChargeClass(@Query("accesstoken") String token, @FieldMap HashMap<String, String> map);

    /**
     * 获取支付方式接口
     *
     * @return
     */
    @GET("/v2/api-employee/user-pay")
    Observable<UserPayModel> getUserPay(@Query("accesstoken") String token);
    /**
     * 合同协议页面接口
     *
     * @return
     */
    @GET("/v2/default/order-deal")
    Observable<OrderDealModel> getOrderDeal(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 清除缓存接口
     *
     * @return
     */
    @GET("/v2/api-employee/all-complete")
    Observable<AllCompleteModel> getAllComplete(@Query("accesstoken") String token);
    /**
     * 会员列表接口
     *
     * @return
     */
    @GET("/v2/api-member/get-member-card")
    Observable<SelectCardTypeModel> getMemberCard(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 搜索结果接口
     *
     * @return
     */
    @GET("/v2/api-member/get-member-list")
    Observable<SearchModel> getMemberList(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);

    /**
     * 平板续费页面数据展示接口
     *
     * @return
     */
    @GET("/v2/api-member/get-card-renewal")
    Observable<RenewModel> getCardRenewal(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 平板续费页面数据展示接口 type2
     *
     * @return
     */
    @GET("/v2/api-member/get-card-renewal")
    Observable<RenewType2Model> getCardRenewalType2(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 获取定金接口
     *
     * @return
     */
    @GET("/v2/api-member/get-deposit")
    Observable<DepositModel> getDeposit(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 普通续费合同展示接口
     *
     * @return
     */
    @GET("/v2/renew-contract/get-renew-contract")
    Observable<RenewContractModel> getRenewContract(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 老卡升级数据展示接口
     *
     * @return
     */
    @GET("/v2/api-member/card-upgrade")
    Observable<UpgradeModel> getCardUpgrade(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 获取折扣接口
     *
     * @return
     */
    @GET("/v2/api-member/get-card-discount")
    Observable<DiscountModel> getCardDiscount(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 购课数据展示接口
     *
     * @return
     */
    @GET("/v2/api-member/get-personal-train")
    Observable<PersonalTrainModel> getPersonalTrain(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);

    /**
     * 购课合同接口
     *
     * @return
     */
    @GET("/v2/buy-charge-contract/get-charge-contract")
    Observable<ChargeContractModel> getChargeContrac(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 场馆接口
     *
     * @return
     */
    @GET("/v2/api-employee/get-all-venue")
    Observable<AllVenueModel> getAllVenue(@Query("accesstoken") String token);
    /**
     * 获取场馆销售的接口
     *
     * @return
     */
    @GET("/v2/api-employee/get-sale")
    Observable<SaleModel> getSale(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 获取折算金额接口
     *
     * @return
     */
    @GET("/v2/api-member/get-member-card-surplus-money")
    Observable<MemberCardSurplusMoneyModel> getMemberCardSurplusMoney(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * 获取订单列表接口
     *
     * @return
     */
    @GET("/v2/api-member/order-list")
    Observable<OrderListModel> getOrderList(@Query("accesstoken") String token, @QueryMap HashMap<String, String> map);
    /**
     * apk升级接口
     *
     * @return
     */
    @GET("/v2/api-service/replace")
    Observable<UpApkModel> getUpApk(@QueryMap HashMap<String, String> map);
}
